home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / libnixv0_7.lha / gnu / lib / libnix / sources.lha / sources / makefile < prev   
Encoding:
Makefile  |  1994-12-13  |  1.5 KB  |  57 lines

  1. # Built one model of the libnix libraries - use
  2. # make CFLAGS="what you like" to built them.
  3. #
  4. # Combine
  5. #
  6. # CFLAGS=-Wall -O3 -DOS_20_ONLY
  7. #
  8. #   -fbaserel -DSMALL_DATA    for small data model
  9. #   -mc68020            for 68020 specific code
  10. #   -mc68881            for 68881 specific code
  11. #   -DIXPATHS            for Un*x path option
  12. #   -DDEBUG_LIB            build a library for debugging (not recommended)
  13. #   -DOS_20_ONLY        disable some 1.3 compatibilities (use always)
  14.  
  15. SOURCEDIR=../sources
  16.  
  17. MAKELIST=make -f ../makefile filelist
  18.  
  19. SUBDIRS=nixmain nix_main misc math nix stubs
  20.  
  21. all: $(SUBDIRS)
  22.     for subdir in $(SUBDIRS); do \
  23.     ( cd $$subdir;make -f ../$(SOURCEDIR)/$$subdir/makefile CFLAGS="$(CFLAGS)" ); \
  24.     done
  25.  
  26. $(SUBDIRS):
  27.     mkdir $@
  28.  
  29. filelists:
  30.     -cd math;    $(MAKELIST) SOURCEFILES="*/*"
  31.     -cd nix;    $(MAKELIST) SOURCEFILES="*/*"
  32.     -cd stubs;    make -f ../makefile libbases/dos.c; \
  33.             $(MAKELIST) SOURCEFILES="libbases/* misc/* libnames/* stubs/*"
  34.  
  35. filelist:
  36.     echo "#Computer generated partial makefile-do not edit" >filelist
  37.     echo "OBJECTS= \\" >>filelist
  38.     ls $(SOURCEFILES)|gawk '{ print substr($$0,1,length($$0)-2) ".o \\" }' >>filelist
  39.     echo >>filelist
  40.     echo "SUBDIRS= \\" >>filelist
  41.     ls -d -F *|gawk '/\// { print substr($$0,1,length($$0)-1) " \\" }' >>filelist
  42.  
  43. libbases/dos.c: ../headers/makebase library.list
  44.     -rm libbases/* libnames/*
  45.     rx /headers/makebase
  46.     
  47. clean:
  48.     cd nixmain;    make clean
  49.     cd nix_main;    make clean
  50.     cd misc;    make clean
  51.     cd math;    make clean
  52.     cd nix;        make clean
  53.     cd stubs;    make clean
  54.  
  55. veryclean:
  56.     -rm -r *
  57.